<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // const arr = ['a', 'b', 'c']
    // console.log(arr.pop());
    // console.log(arr);

    // const arr = ['a', 'b', 'c']
    // arr.unshift('1','2','3','4','5')
    // console.log(arr);


    // const arr = ['a', 'b', 'c']
    // const newArr = arr.map(item => item + 'b')
    // console.log(newArr);

    // const arr1 = ['a', 'b', 'c']
    // const arr2 = ['d', 'e', 'f','g']
    // console.log(arr1.concat(arr2));

    // const arr = ['a','b','c']
    // console.log(arr.join('+'));

    // const arr = "a,b,c,d,e,f,g"
    // console.log(arr.split(' '));
     
    // const arr = ['a','b','c']
    // for(let i of arr.keys()) {
    //   console.log(i);
    // }

  //   const arr =[5,8,10,14,2,3,7]
  //  console.log(arr.sort());

  // const arr = ['a','b','c']
  // arr.shift()
  // console.log(arr);


  // const arr = ['a','b','c']
  // console.log(arr.reverse())


  // const arr = ['a','b','c']
  // const newArr = arr.filter(item => item === 'b')
  // console.log(newArr)

  // const arr = ['a','b','c']
  // const newArr1 = arr.some(item => item === 'b')
  // const newArr2 = arr.some(item => item === 'd')
  // console.log(newArr1);
  // console.log(newArr2)


  // const arr = ['a','b','c']
  // const newArr1 = arr.every(item => item === 'b')

  // console.log(newArr1);


  const arr = [1, 2, 3, 4, 5]
console.log(arr.reduce((a, b) => a + b))
console.log(arr.reduce((a, b) => a * b))
console.log(arr.reduce((a, b) => a - b))
console.log(arr.reduce((a, b) => a / b))
  
  </script>
</body>
</html>